//
//  SliderPageControlView.h
//  GridViewTest1
//
//  Created by Eidan Lin on 12-12-21.
//  Copyright (c) 2012年 taomm. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SliderControlDelegate;

@interface SliderControlView : UIView

@property (strong, nonatomic) UISlider *myControlSlider;
@property (strong, nonatomic) UIView *popBgView;
@property (strong, nonatomic) UIImageView *popImageView;
@property (strong, nonatomic) UILabel *popLabel;  //气泡上的label，显示页码
@property (strong, nonatomic) UILabel *sliderLabel;  //滑块上的label，显示页码
@property (strong, nonatomic) UIImageView *thumbView;  //获得滑块

@property (assign, nonatomic) float myControlSliderWidth;  //slider的宽度,可变
@property (assign, nonatomic) float maxValue;
@property (assign, nonatomic) float minValue;

@property (assign, nonatomic) float leftCapWidth;
@property (assign, nonatomic) float topCapHeight;
@property (assign, nonatomic) id<SliderControlDelegate>delegate;

@property (assign, nonatomic) float sliderBtnWidth;

@property (assign, nonatomic) int isSliderLabelDisplay;   //0:滑块上的label不显示
@property (assign, nonatomic) int isPopViewDisplay;       //0:气泡不显示
@property (assign, nonatomic) int isPopMove;              //0:气泡是否移动

//默认为NO，想要改变，手动设置一下。。
@property (assign, nonatomic) BOOL isWidthChange;

//代码初始化,该给多宽还是给多宽，页数小的话，宽度要调小，通过SliderControlSetUpMaxValue这个函数
- (id)initWithFrame:(CGRect)frame andMinValue:(float )minValue andLeftBackgroundImageName:(NSString *)leftBackground andRightBg:(NSString *)rightBg andSliderBtnImageName:(NSString *)sliderBtn andLeftCapWidth:(float )leftCapWidth andTopCapHight:(float )topCapHeight andPopImageName:(NSString *)pop andPopViewMove:(int )popViewMoveFlag andSliderLabelDisplay:(int )sliderFlag;


-(void) SliderControlSetUpToValue:(float) toValue;

//重设总页数
-(void)SliderControlSetUpMaxValue:(float )totalValue;

//设置宽度。
-(void)sliderControlResetWidth:(float)width;

@end


@protocol SliderControlDelegate <NSObject>

@optional
-(void) SliderControlHasToValue:(float) toValue;
-(void) SliderControlContinueToValue:(float )toValue;

@end